package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;


@EnumDescription("标签类型")
public enum TagLevelEnum implements DictEnum {

    //--------------------start-----------------


    FIRST_LEVEL("01", "一级评价"),

    SECOND_LEVEL("02", "二级评价"),

    THIRD_LEVEL("03", "三级评价"),

    FOURTH_LEVEL("04", "四级评价"),

    FIFTH_LEVEL("05", "五级评价"),
    //--------------------end-------------------
    ;

    private String key;

    private String value;

    TagLevelEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    @Override
    public String getKey() {
        return this.key;
    }

    @Override
    public String getValue() {
        return this.value;
    }

    /**
     * 序列化使用
     */
    public static class Covert extends StdConverter<String, JSONObject> {
        @Override
        public JSONObject convert(String value) {
            return DictEnum.valueOfJson(TagLevelEnum.class, value);
        }
    }
}
